import Cookies from "js-cookie";

const TokenKey = "kll_admin_token";
const RoleKey = "kll_admin_role";
const CodeKey = "kll_admin_code";
const AuthKey = "kll_admin_auth";

export function getAuth() {
  return Cookies.get(AuthKey);
}
export function setAuth(auth) {
  return Cookies.set(AuthKey, auth);
}

export function removeAuth() {
  return Cookies.remove(AuthKey);
}

export function getRole() {
  return Cookies.get(RoleKey);
}
export function setRole(role) {
  return Cookies.set(RoleKey, role);
}

export function removeRole() {
  return Cookies.remove(RoleKey);
}

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function getCode() {
  return Cookies.get(CodeKey);
}

export function setCode(code) {
  return Cookies.set(CodeKey, code);
}

export function removeCode() {
  return Cookies.remove(CodeKey);
}
